#define _CRT_SECURE_NO_WARNINGS
#include"Stack.h"

TestStack1()
{
	ST st;
	StackInit(&st);
	StackPush(&st, 1);
	StackPush(&st, 2);
	StackPush(&st, 3);
	StackPush(&st, 4);

	//StackPop(&st);
	//StackPop(&st);
	//StackPop(&st);
	//StackPop(&st);
	
	STDataType top = StackTop(&st);
	printf("%d\n", top);

	int size = StackSize(&st);
	printf("%d\n", size);

	StackDestroy(&st);

}

TestStack2()
{
	ST st;
	StackInit(&st);
	StackPush(&st, 1);
	StackPush(&st, 2);
	StackPush(&st, 3);
	StackPush(&st, 4);

	while (!StackEmpty(&st))
	{
		STDataType top = StackTop(&st);
		printf("%d ", top);
		StackPop(&st);
	}

	StackDestroy(&st);

}

int main()
{
	//TestStack1();
	TestStack2();
	return 0;
}